---
layout: m1x_soap
title: Category Level
---

				    
<h2><a name="catalog_category.level-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>

<p>The Mage_Catalog module allows you to manage categories and products.</p>

<h4><a name="catalog_category.level-ResourceName%3Acatalogcategory"></a>Resource Name: catalog_category</h4>

<p><b>Aliases:</b></p>
<ul>
	<li>category</li>
</ul>


<h5><a name="catalog_category.level-Method%3A"></a>Method: </h5>
<ul>
	<li>catalog_category.level (SOAP V1)</li>
	<li>catalogCategoryLevel (SOAP V2)</li>
</ul>


<p>Allows you to retrieve one level of categories by a website, a store view, or a parent category.</p>

<p><b>Aliases:</b></p>
<ul>
	<li>category.level</li>
</ul>



<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> website </td>
<td> Website ID or code (optional) </td>
</tr>
<tr>
<td> string </td>
<td> storeView </td>
<td> Store view ID or code (optional) </td>
</tr>
<tr>
<td> string </td>
<td> parentCategory </td>
<td> Parent category ID (optional) </td>
</tr>
</tbody></table>


<p><b>Returns</b>:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> tree </td>
<td> Array of CatalogCategoryEntitiesNoChildren </td>
</tr>
</tbody></table>


<p>The <b>CatalogCategoryEntitityNoChildren</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> int </td>
<td> category_id <br class="atl-forced-newline" /> </td>
<td> Category ID </td>
</tr>
<tr>
<td> int </td>
<td> parent_id <br class="atl-forced-newline" /> </td>
<td> Parent category ID </td>
</tr>
<tr>
<td> string </td>
<td> name <br class="atl-forced-newline" /> </td>
<td> Category name </td>
</tr>
<tr>
<td> int </td>
<td> is_active <br class="atl-forced-newline" /> </td>
<td> Defines whether the category is active </td>
</tr>
<tr>
<td> int </td>
<td> position <br class="atl-forced-newline" /> </td>
<td> Category position </td>
</tr>
<tr>
<td> int </td>
<td> level <br class="atl-forced-newline" /> </td>
<td> Category level </td>
</tr>
</tbody></table>


<h4><a name="catalog_category.level-Examples"></a>Examples</h4>

<h5><a name="catalog_category.level-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client-&gt;login('apiUser', 'apiKey');

$result = $client-&gt;call($session, 'catalog_category.level');
var_dump($result);

// If you don't need the session anymore
//$client-&gt;endSession($session);</pre>
		</div>
</div></div>

<h5><a name="catalog_category.level-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary
 
$result = $proxy-&gt;catalogCategoryLevel($sessionId);
var_dump($result);</pre>
		</div>
</div></div>


<h5><a name="catalog_category.level-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">array
  0 =&gt;
    array
      'category_id' =&gt; string '2' (length=1)
      'parent_id' =&gt; int 1
      'name' =&gt; string 'Default Category' (length=16)
      'is_active' =&gt; string '1' (length=1)
      'position' =&gt; string '1' (length=1)
      'level' =&gt; string '1' (length=1)
  1 =&gt;
    array
      'category_id' =&gt; string '3' (length=1)
      'parent_id' =&gt; int 1
      'name' =&gt; string 'root_category' (length=13)
      'is_active' =&gt; string '1' (length=1)
      'position' =&gt; string '2' (length=1)
      'level' =&gt; string '1' (length=1)</pre>
		</div>
</div></div>

